package Extends.ExtendsText005;

/**
 * ClassName:Manager
 * Package:Extends.ExtendsText005
 * Description:
 *
 * @Author:ZhangXin
 * @Create2023/1/20-2:31
 * @Version:v1.0
 */
public class Manager extends Employee{
    private int bonus;//管理奖金

    public Manager() {
    }

    //需要加上父类中的信息
    //父类+子类
    public Manager(String id, String name, int salary, int bonus) {
        super(id, name, salary);
        this.bonus = bonus;
    }

    public int getBonus() {
        return bonus;
    }

    public void setBonus(int bonus) {
        this.bonus = bonus;
    }

    //重写方法
    @Override
    public void work(){
        System.out.println("我的工作是管理他人");
    }
}
